#ifndef HYBRID_H
#define HYBRID_H

#include "vnode.h"

#include "elisa/elisa.h"

#include "hybrid_config.h"
#include "hybrid_model.h"
#include "hybrid_var.h"
#include "hybrid_solver.h"
#include "hybrid_ode_solver.h"
#include "hybrid_reduction.h"
#include "hybrid_newton_reduction.h"
#include "hybrid_util.h"
#include "parser/hybrid_parser.h"
#include "parser/hybrid_expr_visitor.h"

NAMESPACE_ELISA

inline void useHybrid()
{
	elisa::ReductionFactory *hf = new elisa::HybridReductionFactory(new elisa::NaturalIntervalFormFactory());
	elisa::ReductionFactoryChooser::insert("ContConstraint", hf);
}

inline void useHybridNewton(bool dump = false)
{
	elisa::ReductionFactory *hf = new elisa::HybridNewtonReductionFactory(new elisa::NaturalIntervalFormFactory(), dump);
	elisa::ReductionFactoryChooser::insert("ContConstraint", hf);

#ifdef HYBRID_PROFILE
	odeOut << std::setprecision(20);
	elisa::startDumpTightEncl();
	atexit(endDumpTightEncl);
#endif
}

END_NAMESPACE_ELISA

#endif // HYBRID_H
